import request from '@/utils/request'

// 查询极客侠小程序帖子列表
export function listHairPost(query) {
  return request({
    url: '/system/hairPost/list',
    method: 'get',
    params: query
  })
}
export function getPostDataStatistics(query) {
  return request({
    url: '/system/hairPost/getPostDataStatistics',
    method: 'get',
    params: query
  })
}

export function getPostShareDetail(query) {
  return request({
    url: '/system/hairPost/getPostShareDetail',
    method: 'get',
    params: query
  })
}

// 查询极客侠小程序帖子详细
export function getHairPost(id) {
  return request({
    url: '/system/hairPost/' + id,
    method: 'get'
  })
}

// 新增极客侠小程序帖子
export function addHairPost(data) {
  return request({
    url: '/system/hairPost',
    method: 'post',
    data: data
  })
}

// 修改极客侠小程序帖子
export function updateHairPost(data) {
  return request({
    url: '/system/hairPost',
    method: 'put',
    data: data
  })
}

// 删除极客侠小程序帖子
export function delHairPost(id) {
  return request({
    url: '/system/hairPost/' + id,
    method: 'delete'
  })
}

// 查询小程序标签列表数据
export function getTagList(){
  return request({
    url: '/system/hairPost/getTagList',
    method: 'get'
  })
}
// 帖子发表评论/回复
export function postComment(data){
  return request({
    url: '/system/hairPost/postComment',
    method: 'post',
    data: data
  })
}

